const mongoose = require('mongoose')
const log4js =require('../utlis/log4')
module.exports = ()=>{
    mongoose.connect('mongodb://hyh:hyh193214@www.xinglan.fun/mydata',{
        useUnifiedTopology:true, useNewUrlParser:true
    }).then(()=>{
        console.log('数据库连接成功！')
        log4js.info('数据库连接成功！')
    }).catch((err)=>{
        console.log('连接失败',err)
        log4js.error('连接失败')
    })
}
